Dynamic buffer allocation for a computer system

ABSTRACT

A method for dynamically allocating buffers between components in a computer system is described. Matched sets of bidirectional buffers are used to control data flow between the processor and the computer bus. The dynamic buffer allocation system allows simultaneous data transfer from the processor to the buffers, and from the buffers to the computer bus.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to methods in bridge circuits for managingdata flow between components of a computer system. More specifically,the present invention relates bridge circuits that incorporate abidirectional buffering method to control address and data transfersbetween a processor and components attached to a computer bus.

2. Description of the Related Art

Most, currently available computer systems include several substructuresincluding a central processing unit (“CPU” or “processor”), a memoryarchitecture, and an input/output (I/O) system. As is well known, theprocessor processes information that is provided to it by othersubstructures in the computer system. The memory substructure acts as astorage area for holding commands and data that are eventually actedupon by the processor or other computer components. The input/outputsystem of the computer provides an interface for the computer system tocommunicate with peripheral devices such as hard disks, monitors andtelephone modems. Within the computer are several “buses” that managecommunications and data transfers between the various computersubstructures. For example, a host bus manages information flow to andfrom the processor. Accordingly, data and address information moving toand from the processor travels across the processor bus. In addition anI/O bus manages communications between peripheral devices and otherparts of the computer system.

As faster processors and peripherals have become available to computermanufacturers, the importance of efficiently transferring address anddata information between computer substructures has increased. Forexample, the I/O bus in early personal computers transferred data at aspeed of 8 MHz whereas the I/O bus in modern personal computers runs at33 MHz.

One factor that has driven the development of more efficient mechanismsfor transferring information across the I/O bus is the ever-increasingspeed of modern processors. Unfortunately, technology relating to bussubstructures has not advanced at the same rate as the technologyrelating to processors. For example, processors in modern personalcomputer systems can run at speeds which may be double or triple thespeed of the I/O bus. This is mostly due to the inherent difficulty oftransferring data through the numerous connectors that allow peripheraldevices to communicate with the computer system. Computer systemdesigners have found that communication errors arise when peripheraldevices are connected at high bus speeds through many connectors andbridges.

As an example, current Intel® Pentium® Pro-based personal computers havea 200 MHz processor bus and a 33 MHz Peripheral Component Interconnect(PCI) I/O bus. Due to the speed differential between the Pentium® Proprocessor bus and the PCI bus, the Pentium® Pro processor is forced, inmany instances, to wait through several clock cycles before accessingthe PCI bus to send address or data information to a peripheral device.

To circumvent this problem, others have placed First In/First Out (FIFO)buffers between the Pentium® processor bus and the PCI bus. For example,the Intel® 82433LX Local Bus Accelerator Chip includes a four doubleword deep processor-to-PCI posted write buffer for buffering data writesfrom the Pentium® processor to peripheral devices on the PCI bus. Thisbuffer is a simple first-in/first-out (FIFO) buffer wherein thedestination address is stored in the buffer with each double word ofdata. In use, the processor-to-PCI posted write buffer is positionedwithin a bridge circuit, between the processor bus and the PCI bus. Asthe processor generates data writes to the PCI bus, the data is queuedin the posted write FIFO buffer of the Intel® 82433LX.

The FIFO buffered bridge structure of the Intel® 82433LX allows thePentium® Pro Processor to complete processor to PCI double word memorywrites in three processor clocks (with one wait-state), even if the PCIbus is busy on the first clock. Once the PCI bus becomes available, theposted write data stored in the FIFO buffer is written to the designatedPCI device. Uncoupling the processor request from the PCI bus in thismanner allows the processor to continue processing instructions whilewaiting to retrieve the designated information from the PCI bus.

In addition to the four double word deep posted write buffer, the Intel®82433LX also includes a processor-to-PCI read pre-fetch buffer. Thepre-fetch buffer is four double words deep and enables faster sequentialPentium® Pro Processor reads from the PCI bus. The Intel® 82433LX readpre-fetch buffer is organized as a simple FIFO buffer that only supportssequential reads from the PCI bus.

In practice, data is sent from the PCI bus, through the processor-to-PCIread pre-fetch buffer, to the processor. Processors such as the Intel®Pentium® Pro include an instruction pre-fetch circuit so they can gatherinstructions that are about to be executed by the processor.

Unfortunately, attempts at solving the problem of processors runningfaster than bus substructures have not met with complete success. ManyIntel® Pentium® Pro-based computer systems that employ FIFO bufferingschemes to manage data traffic between the PCI bus and the processor arestill inserting one or more wait states into their bus read and writeinstructions. This lowers the computer system's performance and causesmany software programs to run slower than necessary.

As one example, the Intel® 82433LX only provides a limited flexibilityfor handling data writes and reads to the PCI bus. In particular, theprocessor-to-PCI posted write buffer and processor-to-PCI read pre-fetchbuffer are both unidirectional FIFOs and therefore do not allow forrandom access of their contents. Moreover, if the processor isperforming a tremendous number of write instructions to the PCI bus, theposted write buffer does not have the flexibility to handle more thanfour double words. Thus, wait states are inserted into the processorclock until the FIFO buffers are cleared. For all of the above reasons,it would be advantageous to provide a system that had the flexibility toallow additional buffers to become available during peak write and readperiods. This flexibility is offered by the system of the presentinvention.

SUMMARY OF THE INVENTION

One embodiment of the invention is a bridge circuit that includes adynamic buffer allocation system for efficiently handling data andaddress transfers between a processor and peripheral devices.Incorporated into the bridge circuit is a bidirectional buffering schemethat provides a tremendous amount of flexibility for processor toperipheral bus reads and writes.

In one embodiment, a dynamic buffer allocation (DBA) system is locatedwithin an Intel® Pentium® Pro processor to PCI bus bridge circuit. TheDBA system may provide a matched set of three address and three databuffers. These buffers act together to manage data flow between theprocessor and the PCI bus. In addition, the address and data buffers are“matched” in the sense that each address buffer works in conjunctionwith only one particular data buffer. These buffers, as described below,allow for a flexible, bidirectional data flow between the processor andperipheral bus of a computer.

In operation, the DBA system buffers write and read requests to and fromthe processor to the peripheral bus. However, in contrast to previoussystems, an embodiment of the DBA system uses matched pairs of addressand data buffers. Accordingly, when an address request for a processordata read is sent from the processor to the peripheral bus, it is firstbuffered by the first available address buffer in the DBA system. As theprocessor goes on to perform additional instructions, the addressrequest remains in the first address buffer until a free bus cycle isavailable on the peripheral bus. After the address read request has beensent in a free bus cycle to the target peripheral device, the returningdata is sent to the first data buffer since it works in conjunction withthe first address buffer. Once the requested read data has been sentfrom the peripheral bus to the first data buffer, the processor isnotified that its requested data is available. Thereafter, the data issent on the next available processor cycle across the processor bus tothe processor.

Data write operations from the processor also function in a similarmanner. The processor first sends the destination address to the firstavailable address buffer and the write data to the matched data bufferthat works in conjunction with the address buffer. After the data hasbeen sent to the data buffer, the processor is free to work on otherinstructions. When bus cycles become available on the peripheral bus,the data stored in the data buffer is sent to the address stored in theaddress buffer.

In another embodiment, the processor is an Intel® Pentium® Promicroprocessor and the peripheral bus is a Peripheral ComponentInterconnect (PCI) bus. In such a computer, there are five possible datapaths which manage three types of data transfers. The three types ofdata transfers in the Pentium® Pro system are: 1) processor to PCI WriteData, 2) processor to PCI Read Data, and 3) processor to PCI DeferredData.

As is known, the Intel Pentium® Pro processor may perform a “deferred”data read from the PCI bus by setting a transfer bit that accompaniesthe address request. After the data is read from the PCI device, it issent to a deferred data handling circuit before being sent to theprocessor bus. The deferred data handler keeps track of the outstandingdeferred data reads and notifies the Pentium® Pro processor when adeferred data read from a PCI device is available. Five possible datapaths for handling address and data transfers within the DBA system arelisted below.

1. Input into the data buffers from the processor. (processor to PCIWrite Data)

2. Input into the data buffers from the PCI bus. (processor to PCI ReadData or processor to PCI Deferred Data)

3. Output from the data buffers to the processor via the Host Slave.(processor to PCI Read Data)

4. Output from the data buffers to the processor via the Host Master.(processor to PCI Deferred Read)

5. Output from the data buffers to the PCI bus. (processor to PCI WriteData)

One embodiment of the invention is a method in a computer system forconcurrently transferring data between a processor and a plurality ofperipheral devices. The method includes: a) latching a processor writerequest comprising an address location in a first peripheral device intoa first buffer; b) latching a processor read request comprising anaddress location to be read from a second peripheral device into asecond buffer; c) sending the processor read request from the secondbuffer to the second peripheral device; and d) concurrently transferringdata from the processor to a third buffer and from the second peripheraldevice to a fourth buffer.

Another embodiment of the invention is a method in a computer system forconcurrently transferring data between a processor and a peripheraldevice, including: a) transferring a first address from a processor to afirst buffer; b) transferring the first address to a peripheral device;c) transferring data from the peripheral device to a second buffer,wherein the second buffer is matched with said first buffer; and d)transferring data from the second buffer to the processor while a secondaddress is transferred from the processor to the first buffer.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an overview of the relationshipbetween a Central Processing Unit (processor), Bridge Circuit and PCIdevice in a computer system.

FIG. 2 is a flow diagram illustrating an overview of the process acomputer system using the DBA bridge circuit undergoes to perform a dataread from a peripheral device.

FIG. 3 is a block diagram of the Bridge Circuit of FIG. 1, includingdetails of the dynamic buffer allocation (DBA) system.

FIG. 4 is a block diagram of the address buffers that are part of thedynamic buffer allocation system shown in FIG. 3.

FIG. 5 is a block diagram of the data buffers that are part of thedynamic buffer allocation system shown in FIG. 3.

FIG. 6 is a flow diagram illustrating a process within the addressbuffer input arbiter shown in FIG. 4 to control a CPU request to senddata to the PCI bus.

FIG. 7 is a flow diagram illustrating a process within the addressbuffer output arbiter shown in FIG. 4 to send a PCI address to the PCIbus.

FIG. 8 is a flow diagram illustrating a process within the addressbuffer output arbiter shown in FIG. 4 to read deferred data from a PCIdevice.

FIG. 9 is a flow diagram illustrating a process within the data bufferinput arbiter shown in FIG. 5 to control CPU write data that is destinedfor a PCI device.

FIG. 10 is a flow diagram illustrating a process within the data bufferinput arbiter shown in FIG. 5 to control a PCI read request from theCPU.

FIG. 11 is a flow diagram illustrating a process within the data bufferoutput arbiter shown in FIG. 5 to control CPU read data that is sent tothe PCI bus.

FIG. 12 is a flow diagram illustrating a process within the data bufferoutput arbiter shown in FIG. 5 to control write data that is to be sentto a PCI device.

FIG. 13 is a flow diagram illustrating a process within the data bufferoutput arbiter shown in FIG. 5 to control deferred data that is to bereturned from a PCI device to the CPU.

DETAILED DESCRIPTION OF THE INVENTION

The present invention relates to a flexible buffering system, termedherein the dynamic buffer allocation (DBA) system, in a computer system,for managing data flow between devices or components of a computersystem. These devices and components can be microprocessors,controllers, peripherals or any other substructure in communication withother devices in the computer system. The DBA system is provided withina bridge circuit connecting the processor bus and the peripheral bus ofthe computer system. Accordingly, address and data requests from theprocessor first pass through the DBA system before being sent to aperipheral device. Similarly, data being sent back to the requestingprocessor is also passed through the DBA system.

One implementation of the bridge circuit is within an integrated circuitchip placed on the motherboard of a computer system. However, othersystems using the DBA system are also anticipated. For example, the DBAsystem could be included on a processor board found in a passivebackplane-type computer system. In addition, the DBA system could beintegrated with the processor onto a single silicon chip and placedwithin a computer system.

As discussed below, the DBA system increases processor efficiency byallowing the processor to continue processing instructions as the DBAsystem manages data flow to and from peripheral devices. Peripheraldevices can be hard disks, telephone modems, network interface boardsand the like which connect to the peripheral bus of a computer system.The DBA system provides concurrent and substantially concurrent datatransfers between the host processor and peripheral devices. As usedherein, the term “substantially concurrent” includes data transfers thatoccur within one or several clock cycles of each other. Howeversubstantially concurrent data transfers should not be construed to limitthe data transfers to occur within a pre-determined period of time. Incomputer systems that include the DBA system, data can be simultaneouslyflowing between the host processor and the peripheral devices due to thebi-directional data handling capabilities of the DBA system.

FIG. 1 is a block diagram of a computer system 5. The computer system 5includes a processor 7 that connects via an external processor bus 9 toa bridge circuit 11. In one embodiment, the processor is an Intel®Pentium® Pro processor, although other processors can be used inconjunction with the DBA system. Such processors include the Pentium IIprocessor from Intel, the Alpha® processor from Digital EquipmentCorporation and the PowerPC® processor from Motorola Corporation.Integral to the bridge circuit 11 is a dynamic buffer allocation system13. Within the dynamic buffer allocation system 13 are address and databuffers 15.

As shown, the bridge circuit 11 connects through a peripheral bus 17 toa peripheral device 19. Accordingly, from FIG. 1 it is seen that addressrequests and data that travel from the processor 7 to the externalperipheral bus 17 first pass through the bridge circuit 11. As will bedescribed below, the dynamic buffer allocation system 13 located withinthe bridge circuit 11 acts as a flexible buffer, allowing the processorto continue processing instructions as data is being simultaneouslywritten to or read from peripheral devices.

Overview

FIG. 2 is a flow diagram illustrating an overview of the process 20performed by a computer system having one embodiment of a DBA system toread data from a peripheral device. The process 20 of reading data froma peripheral device begins at a start state 22 and then moves to state23 wherein the processor requires data from a peripheral bus device 19.The process 20 then moves to decision state 25 wherein an inquiry ismade whether any of the address buffers in the DBA system 13 areavailable. As discussed above, the address buffers are used to bufferaddress and status information from the processor before it is sent tothe peripheral bus.

If none of the address buffers are available, the process 20 moves tostate 27 wherein the processor 7 is instructed to retry the cycle at alater time. If an address buffer is determined to be available atdecision state 25, the address is latched into the first availableaddress buffer in the bridge circuit at a state 29. Once the address islatched into the address buffer at state 29, the process 20 moves todecision state 30 to inquire whether the peripheral device is availableto receive the address request. If the peripheral device is notavailable to receive the address request, then the process 20 loopsabout decision state 30 until the peripheral device becomes available.

Once the peripheral device becomes available at decision state 30, thenthe process 20 moves to state 32 wherein the address request is sent tothe peripheral device. Once the peripheral device has retrieved datafrom the requested address, the process 20 moves to state 33 wherein thedata is returned to a data buffer within the DBA system 13 that ismatched to the address buffer. As discussed above, the address buffersand data buffers work as matched pairs. Accordingly, data returned froma request made by a particular address buffer is sent to a predetermineddata buffer. Once the data has been stored in the data buffer, adetermination is made at a decision state 34 whether the processor isavailable. If the processor is not available, then the process loopsback to decision state 34. Once the processor becomes available theprocess 20 moves to state 35 wherein data returned from the peripheraldevice 19 is sent from the data buffer to the processor 7. The processthen ends at an end state 37.

Referring now to FIG. 3, a detailed block diagram of one embodiment of aPentium processor to PCI bridge circuit 40 is shown. An Intel Pentium®Pro processor 41 is linked through an external processor bus 42 to thebridge circuit 40. The bridge circuit 40 communicates across a PCI bus43 to a set of PCI devices 44 a-c. Thus, address and data informationthat is sent to PCI devices 44 a-c from the Pentium® Pro Processor 42first passes through the bridge circuit 40.

As shown in FIG. 3, the external Pentium® Pro processor bus 42 is incommunication with an internal processor bus 45 in the bridge circuit30. The internal processor bus 45 transfers all address and datacommunication from the external Pentium® Pro bus 42 to the internalcomponents of the bridge circuit 40. Similar to the external Pentium®Pro bus 42, in one embodiment the internal processor bus 45 has a 32 bitaddress bus and 64 bit data bus to manage address and data communicationto and from the Pentium® Pro processor 41.

Connected to the internal processor bus 45 is a processor bus mastercontroller 50 and processor bus slave controller 55. The processor busmaster controller 50 handles transfers of deferred cycle retries andreplies that are sent from the PCI devices 44 a-c to the Pentium® Proprocessor 41. As discussed above, the deferred data is managed by adeferred response handler within the processor bus master controller 50.For a complete discussion of a deferred data handler within a Pentium®Pro computer system see Intel® Corporation's Pentium Pro FamilyDeveloper's Manual, Volume #1 which is incorporated by reference.

The processor bus slave controller 55 controls address and data writesfrom the Pentium® Pro processor 41 to the bridge circuit 40 and alsodecodes and directs processor requests to the PCI bus 43. In addition,the processor bus slave controller 55 transfers read data from thedesignated PCI device 44 to the Pentium® Pro Processor 41.

Linked to the processor bus master controller 50 and bus slavecontroller 55 is a PCI Master Controller 57 which includes oneembodiment of a DBA system 60. As discussed above, the DBA system 60buffers request and data transfers between the Pentium® Pro processor 42and all of the PCI devices 44 a-c residing on the PCI bus 43. CPUrequests that are directed to the PCI bus will pass through the PCIMaster Controller 57. Other CPU requests will be directed to theircorrect destination by the CPU Bus Slave Controller 55 or an alternativecontroller (not shown). The only cycles that the PCI target controller62 processes are the cycles generated by the PCI devices 44 a-c. The PCItarget controller 62 handles requests originated from the PCI devices 44a-c to the processor 41 that route through the bus master controller 50.In addition, the PCI target controller 62 manages PCI device requeststhat are sent to the main memory of the computer system.

In order for the bridge circuit 40 to communicate with the external PCIbus 43, an internal PCI bus 65 is provided to place data and addressinformation onto the 32-bit address and 32/64-bit data lines of theexternal PCI bus 43. Thus, a 32-bit deferred read request to the PCI bus43 from the Pentium® Pro processor 41 travels through the externalPentium® Pro bus 42 and onto the internal processor bus 45 of the bridgecircuit 40. The bus slave controller 55 decodes the PCI read request anddirects it to the DBA system 60. The PCI address that is sent with thePentium® request is then buffered in one of the address buffers (notshown) within the DBA system 60. At this point, the Pentium® ProProcessor 41 can continue to execute instructions.

Once the PCI bus 43 is free to accept read requests from an addressbuffer within the DBA system 60, the request is sent out along theinternal PCI bus 65 and finally outside of the bridge circuit 40 to theexternal PCI bus 43. From the external PCI bus 43 the read request issent to a target PCI device 44 a-c which accepts the address request andprepares the requested data for transmission to the Pentium® ProProcessor 41.

The requested data follows the opposite path, through the PCI bus 43,internal PCI bus 65 and into a data buffer (not shown) within the DBAsystem 60. The DBA system 60 then makes a request of the bus mastercontroller 50 to perform a deferred retry or deferred reply cycle to thePentium® Pro processor 41. After the bridge circuit 40 is notified thatthe processor bus is free, the data is written out to the bus mastercontroller 50 and thereafter placed on the internal processor bus 45,external Pentium® Pro bus 42 and finally sent to the Pentium® Proprocessor 41 for processing.

The Address Buffers

As discussed above, the DBA system 60 includes separate sets of addressand data buffers. Referring now to FIG. 4, a block diagram of thedynamic buffer allocation system address buffers 100 is shown. Asillustrated, a processor to PCI address request 110 arrives from the busslave controller 55. The address request 110 may be for one of a PCIread, PCI deferred read, or PCI write. The address request 110 can bebuffered by any of three separate buffers 115 a-c, but the systemprovides a mechanism for pointing the address request to the firstavailable buffer. It should be noted that although the embodimentillustrated in FIG. 4 contains three buffers 115 a-c, the DBA system canincorporate any number of buffers.

Additional status information relating to the address may be sent withthe address request. For example, a transfer type bit may be sent thatdesignates the type of request (eg: read, write, deferred read, etc.)being made by the Pentium processor 41 for the requested address. Thisstatus information may be stored within each of the address buffers 115a-c. The structure of one embodiment of an address buffer is shown inTable 1 below.

TABLE 1 Structure of Address Buffer Address (31:3) Buffer Valid BitResponder Request Bit Transfer Type (Bit 0)-processor Write TransferType (Bit 1)-PCI Write Transfer Type (Bit 2)-processor Read TransferType (Bit 3)-PCI Read Transfer Type (Bit 4)-processor Deferred ReadTransfer Type (Bit 5)-PCI Deferred Read Count-Number of pieces of datato transfer Postable-Bit to indicate that the processor to PCI write wasposted

Address (31:3)

This is the 32-bit address being requested by the processor.

Buffer Valid Bit

The buffer valid bit is a bit that may be set when an address requestinitiator, such as the Pentium® Pro Processor 41 or PCI device 44,requests a transfer and it is accepted. A cycle initiated by a PCIdevice 44 is normally sent to the PCI target controller 62 or to anotherPCI device. The bit may be cleared upon completion of the cycle,indicating that the buffer is available for another address request Thisbit may be set when a processor to PCI read or write cycle is initiatedby the processor and may be cleared upon the write completing on the PCIbus or the read completing on the processor bus.

Responder Request Bit

This bit may be set when the response agent (e.g.: target of the addressrequest) needs to take action. It can be cleared when the response agentis finished performing its task. This bit may be set, for example, whenthe Pentium processor 41 has written data to the matched data buffer fora processor-to-PCI write cycle and cleared when the data has beenwritten from the data buffer to the PCI bus. In addition, this bit maybe set immediately for a processor-to-PCI read and cleared when readdata has been returned from the PCI bus to the appropriate data buffer.

Transfer Type Bits

The transfer type bits are matched pairs of bits that are normally settogether, but cleared individually. These bits are used within the DBAsystem to track the type and state of each buffer. Table 2 belowprovides a description of the transfer type bits utilized in thisembodiment of the invention.

TABLE 2 Transfer Type Bits Bit Bit Bit Bit Bit Bit 5 4 3 2 1 0Description 0 0 0 0 0 0 No transfer for this buffer 0 0 0 0 1 1 Theprocessor has requested a write to the PCI bus but the data hasn't beenwritten to the data buffers yet. 0 0 0 0 1 0 The processor has writtenthe write data to the buffers and the DBA system can perform the PCIwrite transaction. The status bits stay in this state until the PCIwrite cycle has finished. 0 0 1 1 0 0 The processor has requested a readfrom the PCI bus but the buffers have not received the PCI data. 0 0 1 00 0 The PCI bus has returned read data from a PCI device. It is safe tosend the read data from the buffers back to the processor through theprocessor bus slave controller 55. 1 1 0 0 0 0 The processor hasrequested a deferred read from the PCI bus, but the data buffers havenot received the read data from the PCI device. 1 0 0 0 0 0 The PCI bushas returned read data from a PCI device and it is now safe to send thedeferred read data from the buffers back to the CPU through theprocessor bus master controller 50.

Transfer Type Bit 0: (Processor Write)

This bit may be set when the processor initiates a write and is clearedwhen the processor has finished writing data to the data buffer.

Transfer Type Bit 1: (PCI Write)

This bit may be set when an initiator requests a PCI write cycle and iscleared when all write data has been transferred to PCI bus.

Transfer Type Bit 2: (Processor Read)

This bit may be set when the processor initiates a read and is clearedwhen the read data is returned from the matched data buffer to theprocessor.

Transfer Type Bit 3: (PCI Read)

This bit may be set when an initiator requests a PCI read cycle and iscleared when PCI read data has been returned to the data buffer.

Transfer Type Bit 4: (Processor Deferred Read)

This bit may be set when the processor initiates a deferred read and iscleared when deferred read data is returned to the processor.

Transfer Type Bit 5: (PCI Deferred Read)

This bit may be set when an initiator requests a PCI deferred read andis cleared when the PCI device returns read data to the matched databuffer.

As noted above, the status information included within the addressbuffers 115 a-c may include whether a processor write, PCI write,processor read, PCI read, processor deferred read or PCI deferred readis being requested for the specific address.

Many signals can be used to control communications between the Pentium®Pro Processor 41, bridge circuit 40 and PCI device 44. These signals arealso used to designate which address (or data) buffer should receive aparticular request from the Pentium® Pro Processor 41. As can beimagined, it is important for the system to ensure that the properaddress is sent to the proper PCI device 44. In addition, because theaddress and data buffers are separated, the system needs to monitorwhich address and data buffer has completed its task and is availablefor more work. The following signals, as listed in Table 3, are used bythe internal modules of the bridge circuit 40 to coordinate the movementof information between the modules and by the PCI master controller.Signals that begin with “HS” communicate between the PCI mastercontroller 57 and the CPU slave controller 55. Signals that begin with“HM” communicate between the PCI master controller 57 and the CPU Busmaster controller 50. Signals that begin with “PCI” communicateinternally between the PCI master controller 57 and a PCI bus interfacecontroller (not shown) which actually controls signals on the PCI bus.

TABLE 3 Signals Used to Control Address Buffers SIGNAL DESCRIPTIONHS_REQ Set by CPU Bus Slave Controller 55 to request transfer to thedynamic buffer allocation system and indicates that a valid address andstatus bits are waiting on the processor bus. HS_ACK Set by DBA system60 to notify the CPU Bus Slave Controller 55 that the requested transferhas been accepted. HS_DONE Set by the DBA system 60 to signal that theCPU Bus Slave Controller 55 has finished a read transfer to theprocessor 41, a posted write request, a non- posted write data or adeferred request. HM_REQ Set by the dynamic buffer allocation system 60to request a data transfer from the CPU Bus Master Controller 50 to theprocessor 41 and indicates that a valid address and status are waitingon the processor bus 42. HM_ACK Set by the CPU Bus Master Controller 50to notify the dynamic buffer allocation system that the request datatransfer to the processor 41 has been accepted. HM_DONE Set by the CPUBus Master Controller 50 when a deferred read transfer to the processor41 has been completed. PCI_REQ Set by dynamic buffer allocation system60 to notify the PCI control logic (arbiter) that the dynamic bufferallocation system 60 requires a PCI bus cycle to transfer data to thePCI bus 45. PCI_ACK Set by PCI control logic to acknowledge that the PCIbus cycle requested by the dynamic buffer allocation system 60 has beenaccepted. PCI_DONE Set by PCI control logic to indicate that the PCIcycle is finished. HS_REQ_RETRY Given by the next empty Address/StatusBuffer in the dynamic buffer allocation system 60. bottom_addr_ptrPoints to the oldest unfinished Address/Status Buffer that does notcontain a unfinished deferred cycle that has finished on the PCI bus 43.defer_addr_ptr Points to the oldest unfinished Address/Status Bufferthat indicates a deferred cycle. Note: bottom_addr_ptr = PCI_Select inFIG. 4 defer_addr_ptr = Deferred_Select FIG. 4. HM = Processor BusMaster Controller HS = Processor Bus Slave Controller

The embodiment of the DBA system 60 illustrated in FIG. 4 includes aninput arbiter 130 that provides control signals to the address buffers115 a-c. The input arbiter 130 interprets the signals described in Table3, and toggles write enable signals 132 a-c that direct the incomingaddress request 110 into an available buffer.

As discussed above, the address buffers 115 a-c may include three signalpaths; one input and two output. The input path may be used to write PCIaddress transfer requests into the address buffers 115 a-c. This may bedone when both the HS_REQ and HS_ACK signals are asserted, indicatingthat the Pentium® Pro processor 41 has put an address request (HS_REQ)on the processor bus 42 and it has been acknowledged (HS_ACK). Oncethese signals are set, the address and status information is latchedinto the buffer pointed to by the pointer, top_addr_ptr.

For example, when top_addr_ptr points to buffer 115 a (e.g.:top_addr_ptr=0) and signals HS_REQ and HS_ACK are asserted (HS_REQ=1;HS_ACK=1), the system may assert a write enable 0 (WEO) signal 132 a.This enables the system to write the address and status information intobuffer 115 a on the next clock cycle. Following a successful write tobuffer 115 a, top_addr_ptr is incremented by one (top_addr_ptr=1),thereby pointing to buffer 115 b. Note that the top_addr_ptr count forthe three buffer implementation illustrated in FIG. 4 is 0-1-2-0-1-2-0.Through this mechanism, incoming requests are sent to the firstavailable address buffer 115 a-c.

The output path corresponding to an address request to read deferreddata is determined by the pointer defer_addr_ptr. The defer_add_ptr willfollow the top_addr_ptr until a deferred transfer has been accepted,then it points to the chosen buffer until the deferred data transfer iscompleted. The defer_addr_ptr pointer will then point to the next bufferhaving a deferred transfer request, if there is one, or begin followingthe top_add_ptr pointer again. In most situations, the defer_add_ptrpointer is incremented to next the deferred transfer or followstop_addr_ptr when read data is returned from the PCI bus to the databuffers (signaled by PCI_DONE) followed by HM_DONE.

The Data Buffers

Referring now to FIG. 5, a block diagram of the dynamic bufferallocation system data buffers 200 is shown. The data buffers 200 may beused as illustrated in the embodiment shown in FIG. 5, to buffer datatransfers between the Pentium processor 41 and PCI bus 43 that arerequested by the address buffers 100. As shown, processor write data 205or PCI read data 210 are inputs to the data buffer scheme 200. Processorwrite data 205 comes from the processor 41 and is destined for anaddress corresponding to a particular PCI device 44 on the PCI bus 43.PCI read data 210 is data that has been requested by the processor 41and is now being sent from the PCI device 44 to the processor 41.

The processor write data 205 and PCI read data 210 act as inputs into aset of input multiplexers 220 a-c. These multiplexers are under thecontrol of an input arbiter 240 which uses buffer select signals 242 a-cto select the correct one of the Input multiplexers 220 to accept theincoming data stream. This selection process is described morecompletely below in reference to FIG. 6. The input arbiter 240 acts as aselector, activating the proper input multiplexer 220 a-c that shouldreceive the incoming data stream based on the particular address bufferthat first received the request. In addition, each input multiplexer 220a-c is linked to a single data buffer 250 a-c, respectively. Thus, datathat is multiplexed by the input multiplexer 220 a is sent only to databuffer 250 a, while data that is multiplexed by input multiplexer 220 bis only sent to data buffer 250 b.

As discussed above, the address buffers 115 a-c and data buffers 250 a-cwork together as matched pairs so that, for example, requests placed inaddress buffer 115 a (the first address buffer) will always have theirdata sent to the first data buffer 250 a. The dynamic buffer allocationsystem address buffers 115 a-c (FIG. 4) and dynamic buffer allocationsystem data buffers 250 a-c (FIG. 5) work in unison through the signalsand status bits outlined in Tables 1 and 3 so that an address requestinto a particular address buffer 115 will always be matched with itsappropriate data in a matched data buffer 250. In one embodiment,address buffers 115 a, 115 b and 115 c are matched with data buffers 250a, 250 b and 250 c, respectively.

The input arbiter 240 asserts write enable signals 252 a-c to selectwhen to move data from a particular input multiplexer 220 to itscorresponding data buffer 250. Each data buffer can hold up to 255 bits(1 cache line) of data in the embodiment described in FIG. 5. However,it should be noted that data buffers having different capacities couldbe substituted without departing from the spirit of this invention. Inaddition, each buffer 250 has room for four sets of 8-bit byte enabledata wherein each 8-bit byte enable data corresponds to a particular64-bit segment of data in the buffer.

After data has been placed in one of the data buffers 250 a-c, an outputarbiter 270 may select an appropriate output multiplexer 275 a-c basedon the type of request associated with the data held in the data buffer.The data type can be determined by reference to the transfer type bitthat is held in the matching address buffer. For example, the outputarbiter 270 may provide a CPU select signal 272 a to the outputmultiplexer 275 a if the data is to be sent to the processor 41 via theBus Slave Controller 55 as a piece of processor read data 290.Alternatively, the output arbiter 270 may provide a PCI select signal272 b to the output multiplexer 275 b to send the data from a chosendata buffer to a particular PCI device as a piece of PCI write data 295.Finally, the output arbiter 270 may provide a deferred select signal 272c to the output multiplexer 275 c to send deferred data 297 to theprocessor 41 via the Bus Master Controller 50 of the bridge circuit 40.

In one embodiment, the address/status buffers 115 a-c provide the 32-bitaddresses for data that are written into their matched data buffers 250a-c. In this manner, the DBA system 60 can match appropriate addressrequests with the returning data.

The specific signals used within the embodiments described in FIGS. 4-13to control the data buffers 250 a-c are described in Table 4.

TABLE 4 Signals used to Control the Data Buffers SIGNAL DESCRIPTIONHS_READ_STROBE Set by the DBA system to indicate to the bus slavecontroller that read data is ready. HS_READ_BUSY Cleared by the busslave controller to accept data from the DBA system. HS_WRITE_BUSY Setby the DBA system to add wait states to processor to data buffer write.HS_DONE Set by the DBA system to indicate to the PCI control logic thata PCI cycle needs to begin HS_WRITE_STROBE Set by the bus slavecontroller to transfer data to the DBA system. HM_READ_STROBE Set by theDBA system to indicate to the bus master controller that data transferhas been started. HM_READ_BUSY Set by the bus master controller toinsert wait states into the DBA system on returning deferred data.HM_DONE Set by the bus master controller to signal the end of atransfer. PCI_REQ Set by the DBA system to indicate to the PCI controllogic that a PCI cycle needs to take place. PCI_ACK Set by the PCIcontrol logic to acknowledge acceptance of the cycle. PCI_DONE Set bythe PCI control logic to indicate that the PCI cycle is finished.top_data_ptr Controls which data buffer processor data is directed to.bottom_data_ptr Controls which data buffer PCI data is directed to.write_data_out_ptr Controls which data buffer goes to the PCI interface.read_data_out_ptr Controls which data buffer goes to the bus slavecontroller interface. defer_data_ptr Controls which data buffer goes tothe bus master controler interface. NOTE: write_data_out_ptr =PCI_Select in FIG. 5. read_data_out_ptr = processor_Select in FIG. 5.defer_data_ptr = Deferred_Select in FIG. 5.

The input multiplexers 220 a-c are controlled through several pointers,including top_data_ptr, bottom_data_ptr and status signals stored in theaddress buffers 115 a-c. For example if the pointer top_data_ptr=1 andthe transfer type buffer 1 indicates a processor-to-PCI write cycle,then a select signal 242 a-c can be asserted to select a particularmultiplexer 220 a-c that will stroke data into a chosen data buffer 250a-c.

Control of the Address Buffers

FIG. 6 provides a flow diagram illustrating a process 300 undertaken byaddress buffer input arbiter 130 (FIG. 4) to accept addresses into theaddress status buffers 115 a-c from the CPU. The process 300 begins at astart state 310 wherein when the input arbiter 130 receives an addressrequest 110 from the processor 41. The process 300 then moves to adecision state 312 wherein it inquires whether the HS_REQ signal hasbeen asserted. As can be seen upon reference to Table 3, the HS_REQsignal is asserted to request an address transfer to the dynamic bufferallocation system 60 and indicates that a valid address and status bitsare waiting on the processor bus 42.

If the HS_REQ signal is not asserted at decision state 312, then theprocess 300 returns to the start state 310 and continues looping untilthe HS_REQ signal is asserted. Once the HS_REQ signal is asserted at thedecision state 312, the process 300 moves to a decision state 314wherein the input arbiter 130 checks the status of each address buffer115 a-c to determine whether any buffer is available. If no buffers arefree at the decision state 314, then the process 300 moves to state 316wherein the HS_REQ_RETRY signal is set to indicate to the processor 41that the address buffers 115 are full and the request should be retriedlater. The process 300 then loops to start state 310 and waits for anadditional processor request.

If a determination is made at the decision state 314 that one of theaddress buffers 115 a-c is available, then the process 300 obtains theaddress and valid bits from the address bus at a state 315. The process300 then moves to a decision state 317 wherein a determination is madewhether the address request is for a processor write. If a determinationis made at the decision state 317 that the processor has requested atprocessor write, then the process 300 moves to a decision state 318wherein the process 300 determines whether the processor write ispostable.

As is known in the art, certain processor writes are designated as“postable” by being sent to pre-defined addresses. If the addressrequest falls within a postable range, then it is handled in a differentmanner from other processor writes. Data that is sent to a postableaddress is assumed by the processor to have been received by its target,even before an actual acknowledgment is made from the target subsystem.Thus, the processor does not track these types of writes once they aresent to the target. For this reason, data that is sent to postableaddresses on the PCI bus require that the DBA system 60 acknowledgetheir receipt by asserting a HS_DONE signal to indicate that the addresshas been received and the write process was completed.

If the processor write is found to be postable at decision state 318,then the process 300 moves to state 320 wherein receipt of the postableaddress is acknowledged by assertion of the HS_ACK signal, andcompletion of the PCI write is indicated to the processor by assertionof the HS_DONE signal. In addition, the transfer type bits 0 and 1 andthe buffer valid bits are set at state 320 to indicate that thedesignated request is for a processor write. Once the signals HS_ACK andHS_DONE are asserted, and the transfer type bits 0 and 1 and buffervalid bits are set at the state 320, the pointer top_addr_ptr isincremented so that it points to the next address buffer to be filled.As indicated in Table 3, the HS_ACK signal is set by the dynamic bufferallocation system 60 to notify the CPU Bus slave controller 55 that therequested transfer from the processor 41 has been accepted. The process300 then completes by moving to an end state 324.

However, if a determination is made at the decision state 318 that theprocessor write is not postable, then the process 300 moves to a state330 wherein the HS_ACK signal is asserted and transfer type bits 0 and 1and the buffer valid bits are set. In addition, the top_addr_ptr pointeris incremented to point to the next address buffer that will beavailable to accept an address in the dynamic buffer allocation system60.

If a processor write was not being performed at the decision state 317,then the process 300 moves to a decision state 332 wherein adetermination is made whether or not a processor deferred read is beingrequested. If a determination is made at the decision state 332 that theprocessor has requested a deferred read, then the process 300 assertsthe HS_ACK and HS_DONE signals at a state 334 and additionally sets thetransfer type bits 4 and 5 and valid buffer bits. As can be seen uponreference to Table 1, the setting the transfer type bits 4 and 5indicates to the DBA system 60 that the processor has requested adeferred read.

In addition, the top_addr_ptr pointer is incremented at state 334 topoint to the next available address buffer in the DBA system 60. Oncethe process 300 has completed asserting the aforementioned signals atstate 334 it completes at the end state 324.

If a determination is made at the decision state 332 that the processorrequest is not for a deferred read, then the process 300 moves to state336 wherein it assumes that the processor has requested a read procedureand therefore asserts the HS_ACK signal and sets the transfer type bits2 and 3 and buffer valid bits. In addition, the top_addr_ptr pointer isincremented to point to the next available address buffer 115 a-c in thedynamic buffer allocation system 60. The process 300 then moves to endstate 324 wherein it completes.

FIG. 7 is a flow diagram illustrating the process 350 that the addressbuffer output arbiter 135 undertakes to output a PCI address through theoutput multiplexer 140 (FIG. 4). The process 350 begins at a start state352 and moves to a decision state 354 wherein a determination is madewhether the buffer valid bit is set at the location selected by thebottom_addr_ptr pointer. As discussed above, the buffer valid bitindicates that the current address buffer contains a valid address.Thus, when the bottom_addr_ptr pointer points towards a particularaddress, a determination needs to be made whether the address withinthat buffer is valid.

If the buffer valid bit is not set at decision state 354, then theprocess 350 loops back to the start state 352. However, if the buffervalid bit is set at the location selected by the bottom_add_ptr, thenthe process 350 moves to a decision state 356 wherein a determination ismade whether the transfer type bits 3 or 5 are set. As indicated inTable 1, transfer type bits 3 and 5 indicate that a PCI read wasrequested by the processor 41.

If the transfer type bits 3 or 5 are not set, then the process 350 movesto a decision state 358 wherein a determination is made whether thetransfer type bit 1 has been set, thus indicating that the processor 41has requested a write to a device on the PCI bus 43. As indicated inTable 1, transfer type bit 1 is set when an initiator, in this case theprocessor 41, has requested a PCI write cycle. Transfer type bit 1 iscleared when all of the PCI write data from the data buffers 250 a-c(FIG. 5) has been sent to the PCI bus. If transfer type bit 1 is not setat decision state 358 then the process 350 moves back to start state352.

If transfer type bit 1 is set at the decision state 358, then theprocess 350 moves to a decision state 360 to determine whether thetransfer type bit 0 has been cleared. As indicated in Table 1, thetransfer type bit 0 is used to indicate that a processor write has begunsuch that data is written to the address buffer's matched data buffer.Thus, at this point in the process, the processor has requested aprocessor write to a particular address. The address buffer selected bythe top_addr_pointer has accepted the address, and the processor isstarting to fill the corresponding matched data buffer with data that isdestined for the PCI bus. Once the processor has finished writing datato the matched data buffer, the transfer type bit 0 will be cleared inthe address buffer.

Once transfer type bit 0 has cleared, the address buffer output arbiter135 determines that data has been completely written to the data buffer.If the transfer type bit 0 has not been cleared at the decision state360, then the process 350 loops until the transfer type bit 0 iscleared, indicating that the processor has completed writing data to thematched data buffer. Once a determination is made at the decision state360 that the transfer type bit 0 has been cleared, the process 350asserts a PCI_REQ signal at a state 362. As shown in Table 3, thePCI_REQ signal is set to indicate to the PCI bit control logic that thedynamic buffer allocation system 60 requires a PCI bus cycle in order totransfer data from the matched data buffer to the PCI bus.

If the processor has made a read request by setting transfer type bits 3or 5 at decision state 356, then the process 350 moves directly to state362 wherein the PCI_REQ signal is asserted to request a PCI bus cycle.

Once the PCI_REQ signal is asserted at state 362 to request a PCI buscycle, the process 350 moves to a decision state 364 to determinewhether a PCI_ACK signal has been returned from the PCI bus. The PCI_ACKsignal indicates that the PCI bus has a clock cycle available to acceptan address from the address buffer that is currently being pointed to bythe top_addr_ptr pointer. If the PCI_ACK signal has not been returned atdecision state 364, then the process 350 loops until the acknowledgementsignal is returned.

Once the PCI_ACK signal is returned at decision state 364, the addressis placed on the PCI bus at a state 365. The process 350 then moves to astate 366 and increments the bottom_addr_ptr pointer to indicate thenext address buffer to be acted upon in the dynamic buffer allocationsystem 60. The process 350 then completes at an end state 368.

FIG. 8 is a flow diagram illustrating the process undertaken by theaddress buffer output arbiter 135 to send a deferred address requestfrom the output multiplexer 145 to the processor bus master controller50. The process 400 begins at a start state 402 wherein the outputarbiter begins handling a deferred read request from the processor 41.The process 400 then moves to a decision state 404 wherein adetermination is made as to whether the buffer valid bit has been set atthe location currently selected by the defer_addr_ptr pointer. Asdiscussed above, the buffer valid bit indicates that the addresscurrently held in the address buffer is valid and that the processor 41has completed latching the address information into one of the addressbuffers 115. In addition, the defer_addr_ptr points to the oldestunfinished address buffer that contains a deferred address request fromthe processor.

If the buffer valid bit has not been set for the location currentlyselected by the defer_addr_ptr pointer, then the process 400 loops tostart state 402. However, if the buffer valid bit is set at the decisionstate 404, then the process 400 determines whether the transfer type bit4 has been set at a decision state 406. Transfer type bit 4 indicatesthat the address in the address buffer part of a deferred read cycle(Table l). If the transfer type bit 4 has not been set at decision state406, then the process 400 moves to a decision state 408 to determinewhether the defer_add_ptr pointer is equal to the top_addr_ptr pointer.If thedefer_addr_ptr_(—top_addr_ptr at decision state 480, the process 400 loops back to the start state 402.)

As illustrated in FIG. 8, the process 400 loops from state 402 throughdecision states 404, 406 and 408 until all of the deferred transactionshave been processed. Because it is important to maintain the order ofreads and writes on the PCI bus, this loop is used to assure that if thedefer_addr_ptr pointer points to the same buffer as the top_addr_ptrpointer, then every buffer between the defer_addr ptr pointer and thetop_addr_ptr will have a valid bit set. Thus, the process 400 willalways reach decision state 406 to determine whether the transfer typebit 4 has been set, indicating a deferred transfer. Once thedefer_addr_ptr pointer is equal to the top_addr_ptr pointer it is knownthat no more deferred cycles are pending.

If the defer_addr_ptr does not equal the top_add_ptr at the decisionstate 408 then the process 400 increments the defer addr_ptr pointer atstate 410 and completes at an end state 412. In this embodiment, thedynamic buffer allocation system 60 can search for the next addressbuffer that contains a deferred read request by incrementing thedefer_add_ptr pointer when the transfer type bit 4 is not set.

If the process 400 determines at the decision state 406 that thetransfer type bit 4 has been set, thus indicating the address is part ofa deferred read request, an inquiry is made at a decision state 420whether the transfer type bit 5 has cleared. As indicated in Table 1,clearing the transfer type bit 5 indicates to the system that the PCIbus has finished returning the requested data for the PCI read into thematched data buffer 250. If the transfer type bit 5 has not been clearedat the decision state 420, then the process continues to wait fordeferred read data from the target device on the PCI bus at a state 422.The process 400 then loops to the decision state 420 to determinewhether the matched data buffer has completed its deferred read from thePCI bus and cleared the transfer type bit 5.

Once the transfer type bit 5 has been cleared, the process 400 moves tostate 426 wherein the HM_REQ signal is asserted to request a deferreddata transfer from the matched data buffer to the processor. Inaddition, the processor address and total file count size is sent to theprocessor.

The process 400 then moves to a decision state 430 wherein an inquiry ismade whether the HM_REQ_BUSY signal is asserted by the processor. As isknown, data can be transferred from the CPU Bus controller 50 master tothe processor when the HM_REQ signal is asserted and the HM_REQ_BUSYsignal is clear. If a determination is made at decision state 430 thatthe HM_REQ_BUSY signal is not clear, then the process 400 loops untilthe signal has cleared. Once the HM_REQ_BUSY signal has cleared, the DBAsystem can transfer the deferred data from the matched data buffer tothe processor as described below with reference to process 650 of FIG.13.

The process 400 then moves to state 432 wherein the HM_REQ signal iscleared to indicate that the CPU Bus master controller 50 is now free toaccept another data request. The process 400 then moves to the state 410and increments the defer_addr_ptr pointer to indicate the next addressbuffer which should be checked to determine whether it contains adeferred address request (eg: transfer type bit 4). The process 400 thenends at the end state 412.

Control of the Data Buffers

FIG. 9 is a flow diagram illustrating the process undertaken by the databuffer input arbiter 240 to write processor data 205 to a device on thePCI bus. The process 450 begins at a start state 452 wherein the databuffer input arbiter 240 receives a processor-to-PCI write request fromthe processor 41. The process 450 then moves to a decision state 454wherein a determination is made whether the buffer valid bit is set atthe location selected by the top_data_ptr pointer. As can be seen uponreference to Table 4, the top_data_ptr pointer tracks which data buffershould receive data for a particular matched address buffer. If thebuffer valid bit is not set at the location pointed to by thetop_data_ptr pointer then the process 450 loops back to start state 452until the buffer valid bit is set.

Once the buffer valid bit is set at the location selected by thetop_data_ptr pointer, the process 450 determines whether the transfertype bits 0 and 1 have been set in the corresponding matched addressbuffer at a decision state 454. If transfer type bits 0 and 1 are notset in the matched address buffer, the process 450 moves to a decisionstate 458 to determine whether the top_data_ptr pointer equals thetop_addr_ptr pointer. If these pointers are equal at decision state 458then the process 450 returns to start state 452.

However, if the top_data_ptr pointer does not equal the top_addr_ptrpointer at the decision state 458, then the process 450 moves to state460 wherein the top_data_ptr pointer is incremented. Once thetop_data_ptr pointer has been incremented to point to the next availabledata buffer, the process 450 completes at an end state 462.

If the transfer type bits 0 and 1 were found to be set at the decisionstate 456, then the process 450 clears the HS_WRITE_BUSY signal at astate 466 and loads a count of the number of bytes to send from theprocessor 41 to the target device. The process 450 then moves to adecision state 468 and determines whether the HS_WRITE_STROBE signal hasbeen asserted. When the HS_WRITE_BUSY signal is clear and theHS_WRITE_STROBE is asserted, then data is being transferred from theprocessor to the data buffer pointed to by the top_data_ptr pointer.

If a determination is made that the HS_WRITE_STROBE is not asserted atthe decision state 468, then the process 450 loops until the signal isasserted. Once the HS_WRITE_STROBE signal has been asserted, thusindicating that data can be sent to the data buffer, at the decisionstate 468, the process 450 sends data to the matched data buffer at astate 469. The byte count of the data that was sent to the data bufferat state 469 is then decremented in a state 470 from the total number ofdata bytes coming from the processor. A determination is then made at adecision state 474 whether the byte count of the file coming from theprocessor has reached zero. If the count has not reached zero, then theprocess 450 loops back to state 469 wherein more pieces of data are sentto the matched data buffer.

However, if the count has reached zero at decision state 474, then theprocess 450 clears the transfer type bit zero at a state 476 andincrements the top_data_ptr pointer at the state 460 to point to thenext data buffer that is to accept data. As indicated in Table 1,clearing the transfer type bit zero indicates to the dynamic bufferallocation system that the processor has completed sending the PCI writedata to the designated buffer. The process then completes at end state462.

FIG. 10 is a flow diagram describing the process that the data bufferinput arbiter 240 undergoes to manage PCI read data 210 (FIG. 5) as itis being input into the data buffers 250 a-c. The process 500 begins ata start state 502 wherein incoming PCI read data is sent to the databuffers 200 from a PCI device 44. The process 500 then moves to adecision state 504 wherein a determination is made whether the buffervalid bit is set at the location selected by the bottom_data_ptrpointer.

If the buffer valid bit is not set at the decision state 504, then theprocess returns to the start state 502. However, if the buffer valid bitis set at the decision state 504, the process 500 moves to a decisionstate 506 wherein a determination is made whether the transfer type bits2 and 3 or the transfer type bits 4 or 5 are set. As described inreference to Table 1, transfer type bits 2 and 3 indicate that thematched address buffer holds an address for a processor and PCI readrequest whereas transfer type bits 4 and 5 indicate that the addressrequest in the address buffer is for a deferred read request.

If transfer type bits 2 and 3 or transfer type bits 4 and 5 are not setat the decision state 506, then the process 500 moves to a decisionstate 508 wherein a determination is made whether the buffer valid bitis set for the location selected by the bottom_data_ptr pointer. If thebuffer valid bit is set at the location selected by the bottom_data_ptrpointer then the process loops until the buffer valid bit is not set.Once it is determined at decision state 508 that the buffer valid bit isno longer set, the process 500 increments the bottom_data_ptr pointer ata state 510 to move the pointer to the next data buffer to analyze. Inaddition, the transfer type bits 3 and 5 are cleared at state 510 toindicate that process of reading (or deferred reading) data from a PCIdevice has been completed. The process 500 then ends at an end state512.

If the transfer type bits 2 and 3 or the transfer type bits 4 and 5 wereset at the decision state 506, then the process 500 moves to state 520and begins accepting writes from the PCI bus to the buffer selected bythe bottom_data_ptr pointer. In addition, writes to the matched addressbuffer are enabled and the count is loaded into a memory. The process500 then moves to decision state 522 wherein a determination is madewhether the byte count of the file being sent to the data buffer hasreached zero.

If the count is not zero, then the process 500 moves to a decision state524 and determines whether a PCI write enable signal has been returnedfrom the PCI bus. If a PCI write enable signal has been returned fromthe PCI bus as determined at decision state 524, then the process 500moves to state 530 and decrements the byte counter and increments writesfrom the PCI bus to the next logical address in the cache line buffer.The process 500 increments writes from the PCI bus if the count isgreater than zero during a processor to PCI read cycle because more thanone data phase will occur on the PCI bus. Thus, the double word (DWORD)of the data buffer that is being written to will need to be incrementedto select the next DWORD in the cacheline for each consecutive PCI dataphase. The process 500 then determines whether the PCI_DONE signal hasbeen returned from the PCI bus control logic at a decision state 532.

If the count is found to be zero at decision state 522 then the process500 moves directly to the decision state 532 to determine whether thePCI_DONE signal has been returned. Similarly, if it is determined in thedecision state 524 that a PCI write enable signal has not been, then theprocess 500 moves to decision state 532 to determine whether thePCI_DONE signal has been returned.

If it is found in decision state 532 that the PCI_DONE signal has notbeen, then the process 500 loops to decision state 522 to determinewhether the count is zero. As is discussed in reference to Table 4, thePCI_DONE signal indicates that the PCI bus control logic has completedwriting all of the data from the PCI bus to the designated data buffer.However, if the PCI_DONE signal has been returned, thus indicating thatthe data buffer has a complete copy of the data requested by theprocessor, the process 500 moves to state 510 wherein thebottom_data_ptr pointer is incremented and transfer type bits 3 and 5are cleared. The process 500 then concludes at the end state 512.

FIG. 11 describes the process 550 that the data buffer output arbiter270 undergoes to coordinate sending data that is stored in a data bufferto the processor. The process 550 begins at a start state 552 and thenmoves to a decision state 554 wherein a determination is made whetherthe buffer valid bit has been set at the location selected by theread_data_out_ptr pointer. If the buffer valid bit has not been set atthe location selected by the read_data_out_ptr pointer at the decisionstate 554, then the process 550 loops to the start state 552. However,if the buffer valid bit has been set at the decision state 554, then theprocess 550 moves to decision state 556 and determines whether transfertype bit 2 has been set. As can be seen upon reference to Table 1, thetransfer type bit 2 is set when data is being sent from the data bufferback to the processor as part of a CPU read cycle.

If transfer type bit 2 has been set at the decision state 556, then theprocess 550 moves to decision state 558 wherein a determination is madewhether the transfer type bit 3 is clear. The transfer type bit 3 iscleared when all of the data from the selected PCI device has been sentto the specified data buffer. If the transfer type bit 3 is not clear atthe decision state 558 then the process 550 loops until it becomesclear. Once the transfer type bit 3 becomes clear at the decision state558, then the process 550 moves to state 560, loads the byte count, andasserts the HS_READ_STROBE signal.

Once the HS_READ_STROBE signal has been asserted at state 560 toindicate to the CPU Bus master controller 50 that data is ready to besent to the processor, the process moves to decision state 562 todetermine whether the HS_READ_BUSY signal has been asserted. If thissignal has been asserted at the decision state 562 then the process 550continues to loop until the HS_READ_BUSY signal is no longer asserted.Once the signal has been determined to not be asserted at the decisionstate 562, then the process sends a data block to the processor at astate 563. The process 550 then moves to state 564 wherein the counteris decremented by the number of bytes sent to the processor in state563. The process 550 then moves to a decision state 566 to determinewhether the byte count has become zero, thus indicating that the entirefile has been sent from the data buffer to the processor. If the countis not zero at the decision state 566, then the process 550 moves todecision state 562 to determine whether the HS_READ_BUSY signal has beenasserted.

However, if the count is determined to be zero at the decision state566, then the process 550 moves to decision state 568 to determinewhether the HS_DONE signal has been asserted. As can be seen uponreference to Table 3, assertion of the HS_DONE signal indicates that aread transfer from the CPU Bus Slave Controller 55 to the processor hasbeen completed. If the HS_DONE signal has not been asserted at thedecision state 568, then the process loops until it becomes asserted.Once the HS_DONE signal is asserted at the decision state 568,indicating that the read data from the PCI bus has been sent to theprocessor, the process 550 moves to state 570 and clears the buffervalid bit and transfer type 2 bit. By clearing these bits, the process550 makes the current buffer available to receive additional sets ofdata. The process 550 then moves to a state 572 wherein theread_data_out_ptr pointer is incremented. The process then ends at anend state 574.

If the transfer type bit 2 was not set at the decision state 556, thenthe process 550 moves to a decision state 580 in order to determinewhether the read_data_out_ptr pointer is equal to the top_addr_ptrpointer. If these pointers are equal at decision state 580, then theprocess loops to start state 552. However, if the read_data_out_ptrpointer does not equal the top_addr_ptr pointer at the decision state580, then the process 550 moves to state 572 wherein the read_data_outptr pointer is incremented and the process then ends at the end state574.

FIG. 12 describes a process 600 that the output arbiter 270 undertakesto output PCI write data 295 from an output multiplexer 275B. Theprocess 600 begins at a start state 602 and then moves to a decisionstate 604 wherein a determination is made whether the buffer valid bitwas set at the location selected by the write_data_out_ptr pointer. Ifthe buffer valid bit was not set, then the process loops back to thestart state 602.

However, if the buffer valid bit was determined to have been set in thedecision state 604, then the process 600 moves to a decision state 606and determines whether the transfer type bit 1 is set. As can be seenupon reference to Table 1, the transfer type bit 1 indicates that theprocessor has requested a PCI write. If the transfer type bit 1 is notset, then the process 600 moves to a decision state 608 to determinewhether the write_data_out_ptr pointer is equal to the top_addr_ptrpointer. If these pointers are equal, then the process 600 moves back tostart state 602. However, if the pointers are not equal, then theprocess 600 moves to state 610 wherein the write_data_out_ptr pointer isincremented. The process 600 then completes at an end state 612.

If the transfer type bit 1 was determined to have been set in thedecision state 606, indicating that the processor has requested a PCIwrite, then the process 600 moves to a decision state 620 to determinewhether the transfer type bit 0 has cleared. As indicated in Table 1,the transfer type bit 1 indicates a processor write has been initiatedto the data buffer. Once the processor has completed writing data to thedata buffer, the transfer type bit 0 is cleared from the matched addressbuffer.

If the transfer type bit 0 is not cleared at decision state 620, thenthe process 600 moves to state 621 and continues reading processor data.The process 600 then loops back to the decision state 620 to determinewhether the transfer type bit 0 has cleared. Once the transfer type bit0 has cleared, indicating that all of the processor data has been sentto the data buffer, the process 600 determines whether the PCI_DONEsignal has been asserted at a state 622. As can be seen upon referenceto Table 4, the PCI_DONE signal is asserted when a data transfer fromthe data buffers to the PCI bus has been completed. Thus, if thePCI_DONE signal is not asserted at decision state 622, then the process600 moves to state 623 and continues writing data to the target PCIdevice. As data is being written to a PCI device at state 623, theprocess 600 will continue to check for the PCI_DONE signal at thedecision state 622.

Once the PCI_DONE signal is detected as having been asserted at thedecision state 622, the process 600 moves to a decision state 624 todetermine whether the PCI write cycle was postable. As discussed above,a postable write is one wherein the processor relinquishes control ofthe write as soon as it is sent from the processor. The processor doesnot wait to receive an acknowledgment that the write cycle hascompleted. If the PCI write cycle was not postable, then the process 600moves to state 626 wherein the HS_DONE signal is asserted for one clockcycle. The process 600 then moves to state 628 wherein the transfer typebit 1 and buffer valid bit are cleared so that buffer is available toreceive a new set of data.

If a determination is made at the decision state 624 that the processwas postable, then the process 600 moves to the state 628 and thetransfer type bit 1 and buffer valid bit are cleared without assertionof the HS_DONE signal. As shown in FIG. 6, the HS_DONE signal forpostable writes is asserted at state 320. Therefore it is not necessaryto assert it again once the postable write is finally sent to a PCIdevice.

FIG. 13 provides a description of a process 650 by which the data bufferoutput arbiter 270 sends out deferred data 297 through the outputmultiplexer 275 (FIG. 5). The process 650 begins at a start state 652and then moves to a decision state 654 wherein a determination is madewhether the buffer valid bit is set at the location selected by thedefer_data_ptr pointer. If the buffer valid bit is not set at thislocation, then the process 650 returns to start state 652 and waits forvalid data to arrive. However, if the buffer valid bit is set at thedecision state 654, then the process 650 moves to decision state 656 anddetermines whether the transfer type bit 4 has been set at a decisionstate 656. As can be seen upon reference to Table 1, the transfer typebit 4 indicates that the processor has requested a processor deferredread.

If transfer type bit 4 is not set at the decision state 656, then theprocess 650 moves to decision state 658 and determines whether thedefer_data_ptr pointer is equal to the top_addr_ptr pointer. If thesepointers are equal, then the process 650 returns to the start state 652.However, if these pointers are not equal, then the process 650 moves toa state 660 wherein the defer_data_ptr pointer is incremented. Theprocess then ends at an end state 662.

If a determination is made at the decision state 656 that transfer typebit 4 was set, the process 650 moves to decision state 666 and makes adetermination whether transfer type bit 5 has cleared. As indicated inTable 1, transfer type bit 5 is cleared when the PCI device has returnedread data to the requested data buffer. Thus, transfer type bit 5 willbe cleared once PCI deferred read data has been sent from the PCI bus tothe current buffer.

If a determination is made at the decision state 666 that the transfertype bit 5 has not cleared, then the process 650 moves to state 667 andreads data coming from the target PCI device. The process 650 keepschecking at the decision state 666 whether the transfer type bit 5 hascleared as it is reading data at state 667. Once the complete set ofdata has come from the target PCI device, the transfer type bit 5 iscleared from the address buffer and the process 650 loads the count andasserts the HM_READ_STROBE signal at a state 668. The process 650 thenmakes a determination whether the HM_READ_BUSY signal is asserted at adecision state 670. If this signal is found to be busy at the decisionstate 670, then the process 650 loops at state 670 until the signal isno longer asserted, indicating that the master controller is availableto accept data from the data buffers.

Once the HM_READ_BUSY signal is no longer asserted, the process 650decrements the count at a state 672 and thereafter determines whetherthe count is at zero at a decision state 676. If the count is not zeroat decision state 676, then the process 650 returns to the decisionstate 670 to determine whether the HM_READ_BUSY signal was asserted.

However, if the count is zero at the decision state 676 indicating thatall of the data has been transferred to the bus master controller, thena determination is made at a decision state 680 as to whether theHM_DONE signal is asserted. If the HM_DONE signal is not asserted at thedecision state 680, then the process loops at that state until thesignal becomes asserted. Once the HM_DONE signal is asserted, theprocess 650 moves to a state 682 wherein the buffer valid bit andtransfer type bit 4 are cleared. The process 650 then increments thedefer_data_ptr pointer at the state 660 and completes at an end state662.

Due to the flexibility of some embodiments of the dynamic bufferallocation system, several of the data transfers between the processorand the PCI bus may occur simultaneously. This may advantageously resultin a higher data throughput between the processor and the PCI bus ascompared to prior systems. For example, in the DBA system, data transferfrom the processor to a first data buffer may occur concurrently withdata transfer from a second data buffer to the PCI bus. In this manner,the system can be writing data from the processor to a first buffer,while the system is simultaneously writing from a second buffer to thePCI bus.

Similarly, the processor may be writing data to a first data buffer atthe same time that data is being read from the PCI bus into a seconddata buffer. In addition, a deferred data read from a first data bufferto the processor may occur concurrently with a data read from the PCIbus to a second data buffer. Moreover, the dynamic allocation system mayperform a deferred data read from a first data buffer to the processorat the same time that it performs a data write operation from a seconddata buffer to the PCI bus.

Several embodiments of the invention provide significant advantages. Forexample, in one embodiment the same set of data registers holds datathat is flowing in both directions. Previous buffering schemes relied onpairs of unidirectional FIFO buffers to provide the desiredbidirectional functionality. Because a pair of FIFO buffers requiresmany more transistors to implement than does a single FIFO buffer, theDBA system can be manufactured in many cases to be less expensive andmore efficient than prior systems.

In addition, the DBA system provides advantages because it is not basedon a First In/First Out scheme for managing data flow. For this reason,the system provides more data handling flexibility by allowing higherpriority reads and writes to be executed before earlier, lower prioritytransactions. This is especially important with microprocessors such asthe Intel Pentium® Pro which may execute many out of order instructions.Because these buffers are not controlled in a first in/first out manner,more flexibility is provided so that the most relevant data is handedoff to the bus or processor before less relevant data.

The invention may be embodied in other specific forms without departingfrom its spirit or essential characteristics. The described embodimentis to be considered in all respects only as illustrative and notrestrictive and the scope of the invention is, therefore, indicated bythe appended claims rather than by the foregoing descriptions. Allchanges which come within the meaning and range of equivalency of theclaims are to be embraced within their scope.

What is claimed is:
 1. In a computer system, a method for concurrentlytransferring data between a processor and a plurality of peripheraldevices via a dynamic buffer allocation system comprising a plurality ofaddress buffers and a plurality of data buffers, wherein each of saidplurality of address buffers is exclusively associated with one of saidplurality of data buffers, the method comprising the acts of: latching aprocessor write request comprising an address location in a firstperipheral device into a first address buffer of the dynamic bufferallocation system; latching a processor read request comprising anaddress location to be read from a second peripheral device into asecond address buffer of the dynamic buffer allocation system; sendingsaid processor read request from said second address buffer to saidsecond peripheral device; and concurrently transferring data from saidprocessor to a first data buffer of the dynamic buffer allocation systemassociated with said first address buffer and from said secondperipheral device to a second data buffer of the dynamic bufferallocation system associated with said second address buffer.
 2. Themethod of claim 1, further comprising concurrently transferring datafrom said first data buffer to said first peripheral device and fromsaid second data buffer to said processor.
 3. The method of claim 1,wherein said method for concurrently transferring data between aprocessor and a plurality of peripheral devices comprises transferringdata between an Intel Pentium® Pro processor and a plurality ofperipheral devices.
 4. The method of claim 1, wherein said method forconcurrently transferring data between a processor and a plurality ofperipheral devices comprises transferring data between a processor andfirst and second Peripheral Component Interconnect (PCI) devices.
 5. Themethod of claim 1, wherein said method for concurrently transferringdata between a processor and a plurality of peripheral devices comprisestransferring data across a processor bus.
 6. The method of claim 1,wherein said method for concurrently transferring data between aprocessor and a plurality of peripheral devices comprises transferringdata across a peripheral bus.
 7. The method of claim 6, wherein saidmethod for concurrently transferring data between a processor and aplurality of peripheral devices comprises transferring data across aPeripheral Component Interconnect (PCI) bus.
 8. In a computer system, amethod for concurrently transferring data between a processor and aperipheral device, comprising the acts of: transferring a first addressfrom a processor to a first buffer; transferring said first address to aperipheral device; transferring data from said peripheral device to asecond buffer in response to said first address, said second bufferbeing matched with said first buffer; and transferring said data fromsaid second buffer to said processor while a second address istransferred from said processor to said first buffer, wherein said firstbuffer, and said second buffer, are part of a dynamic buffer allocationsystem.
 9. The method of claim 8, further comprising the acts of:transferring a third address to a third buffer from said peripheraldevice; transferring said third address to said processor; transferringsaid second address to said peripheral device; concurrently transferringdata from said processor to a fourth buffer, said fourth buffer beingmatched with said third buffer, and transferring data from saidperipheral device to said second buffer.
 10. The method of claim 8,wherein said method for concurrently transferring data between aprocessor and a peripheral device comprises transferring data between aprocessor and a Peripheral Component Interconnect (PCI) device.
 11. Themethod of claim 8, wherein said method for concurrently transferringdata between a processor and a peripheral device comprises transferringdata across a processor bus.
 12. The method of claim 8, wherein saidmethod for concurrently transferring data between a processor and aperipheral device comprises transferring data across a peripheral bus.13. The method of claim 12, wherein said method for concurrentlytransferring data between a processor and a peripheral device comprisestransferring data across a Peripheral Component Interconnect (PCI) bus.